package taglib.common{
   import mx.controls.DataGrid;
   import mx.core.EdgeMetrics;
   import mx.core.ScrollPolicy;
   public class MyDataGrid extends DataGrid {
      public var skinBorder:Object;
      public function MyDataGrid() {
         super();               
      }     
      override public function get viewMetrics():EdgeMetrics {        
         var vScrollBarWidth:int;
         var hScrollBarHeight:int;
         if (verticalScrollPolicy == ScrollPolicy.AUTO && verticalScrollBar && verticalScrollBar.visible) 
            vScrollBarWidth = this.verticalScrollBar.width;
         if (horizontalScrollPolicy == ScrollPolicy.AUTO && horizontalScrollBar && horizontalScrollBar.visible)
            hScrollBarHeight = this.horizontalScrollBar.height;
         
        return new EdgeMetrics(
          skinBorder[0], 
          skinBorder[1], 
          skinBorder[2]+vScrollBarWidth, 
          skinBorder[3]+hScrollBarHeight);         
      }                 
   }
}